package org.domain.rescue2011.session;

import org.jboss.seam.annotations.Name;
import org.jboss.seam.framework.EntityHome;

import es.us.isa.jdbl.domain.AbstractNode;
import es.us.isa.jdbl.domain.Contract;

@Name("contractHome")
public class ContractHome extends EntityHome<Contract>{

	public void setContracteNid(Integer id) {
		setId(id);
	}

	public Integer getContractNid() {
		return (Integer) getId();
	}

	@Override
	protected Contract createInstance() {
		Contract contract = new Contract();//TODO esto q es?XD
		return contract;
	}

	public void load() {
		if (isIdDefined()) {
			wire();
		}
	}

	public void wire() {
		getInstance();
	}

	public boolean isWired() {
		return true;
	}

	public Contract getDefinedInstance() {
		return isIdDefined() ? getInstance() : null;
	}

	
	
}
